package com.cwx.mychat.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cwx.mychat.entity.po.GroupInfo;
import com.cwx.mychat.entity.po.UserInfo;
import com.cwx.mychat.entity.vo.GroupInfoVo;
import com.cwx.mychat.entity.vo.UserInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GroupInfoMapper extends BaseMapper<GroupInfo> {
    void updateCurrentNumber(@Param("groupId") String groupId);

    /**
     * 通过Ids查询群组信息
     * @param managesGroupIds
     * @return
     */
    List<GroupInfoVo> selectByIds(@Param("groupIds") List<String> managesGroupIds, @Param("userId") String userId);

    /**
     * 查询群组中的群成员
     * @param groupId
     * @return
     */
    List<UserInfoVO> selectMemberList(@Param("groupId") String groupId);
}

